home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_064
/
readmes
/
compilingiff
< prev
next >
Wrap
Text File
|
1992-05-06
|
4KB
|
104 lines
>>> Tips for Compiling IFF Examples <<<
Carolyn Scheppner - CBM
IFF examples, in most cases, are not self-contained programs.
They need to be linked with various IFF modules which contain
the IFF reader/writer/general routines that are used both directly
and indirectly by the example. Information on which IFF modules
are required by the EA examples in the SOURCE directory can be found
in the lnk.files directory. The examples in the EXAMPLES directory
contain linkage information in their opening comments, and .with
files are supplied for those which must be linked with IFF modules.
See the AmigaDos Developer's Manual "The Linker" chapter for more
info on WITH files. Examples and modules are listed below.
The IFF header (.h) files are also required when compiling the
examples. The headers can be found in the INCLUDE/iff directory.
I will assume that you have set up your C development system
so that there is plenty of room on your source & headers work disk.
Make an "iff" subdirectory in your "include" directory and copy
the IFF headers there. Note for AZTEC C people: get rid of the
comments inside the parentheses in the function definitions in
packer.h.
Make a directory (or directories) on your work disk for the IFF
object (.o) modules. Since I work out of ram:, I keep the IFF
modules in 3 directories (iffrobj, iffwobj, iffobj). Then I
can easily copy just the ones I need to ram:. The object modules
you need are listed below (IFF reader, writer, general modules).
Note for AZTEC C people: These are Amiga C object modules. Copy
the source (.c) for the modules to your C work disk and recompile
them with AZTEC (without linking). The compiler.h header contains
a switch (FDwAT) for compatibility with various compilers. You
may have to change the value of this switch. In addition, you may
find it necessary to link with your 32 bit library. I use Lattice
but I would appreciate a list of any changes needed in the IFF
source for compilation under Manx. I could include the list on
the next release of this disk, or possibly incorporate the changes
into the source.
To compile an example, copy the example source (.c) file to
your C work disk (or ram: if that's where you work). Compile
the file WITHOUT linking it. You should now have a .o file for
the example.
(Note: Following linkage instructions are for Amiga C but should
be helpful with other development systems as well)
Use your editor to create a WITH file for the example. You
can start with the appropriate file from modified.lnk.files.
Add the proper paths to the filenames so that ALINK can find
each of the files.
For example, if Example.o was in df1:obj, the IFF .o modules
were all in df1:iffobj, your startup and lib's were in df0:lib,
and you wanted your executable placed in df1:executables, this
would be your Example.with file:
FROM df0:lib/LStartup.obj, df1:obj/Example.o, df1:iffobj/iffr.o,*
df1:iffobj/ilbmr.o, df1:iffobj/unpacker.o
TO df1:executables/Example
LIBRARY df0:lib/LC.lib, df0:lib/Amiga.lib
When I'm working with IFF, I keep my files and all of the IFF .o
modules I need in ram:, and I'm cd'd there. I assign the label LIB:
to the directory containing my startup code and linker libraries.
This is my Display.with:
FROM LIB:AStartup.obj,Display.o,myreadpict.o,iffmsgs.o*
iffr.o,ilbmr.o,unpacker.o
TO Display
LIBRARY LIB:Amiga.lib, LIB:LC.lib
Linking is easy once you've set up the .with file:
Alink with Display.with
-------------------------------------------------------------------------
>>> List of IFF modules <<<
IFF reader modules:
iffr.o Lowest level reader rtns
ilbmr.o Higher level ILBM reader rtns
readpict.o Highest level ILBM reader
unpacker.o Unpacking rtn
IFF writer modules:
iffw.o Lowest level writer rtns
ilbmw.o Higher level ILBM writer rtns
putpict.o Highest level ILBM writer
packer.o Packing rtn
General IFF modules:
gio.o Fast IO rtns
remalloc.o Memory allocation rtns
--------------------------------------------------------------------------